Skip to content

Conversation

IceSentry
Copy link
Contributor

Objective

  • It seems counterintuitive that the task removes itself
  • More than once I have tried copying the code from this example and then remove the content of the task to replace it with what I need and then I get errors about a task being polled after it's already completed because I never removed it.

Solution

  • Remove the task in the handle_tasks system after it's done being "handled".

Testing

  • Ran the example and it still works as expected

@IceSentry IceSentry added C-Docs An addition or correction to our documentation C-Examples An addition or correction to our examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward D-Straightforward Simple bug fixes and API improvements, docs, test and examples A-Tasks Tools for parallel and async work labels Jul 17, 2025
@janhohenheim janhohenheim added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jul 23, 2025
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Jul 28, 2025
Merged via the queue into bevyengine:main with commit 6bb0473 Jul 28, 2025
45 checks passed
tychedelia pushed a commit to tychedelia/bevy that referenced this pull request Jul 31, 2025
# Objective

- It seems counterintuitive that the task removes itself
- More than once I have tried copying the code from this example and
then remove the content of the task to replace it with what I need and
then I get errors about a task being polled after it's already completed
because I never removed it.

## Solution

- Remove the task in the handle_tasks system after it's done being
"handled".

## Testing

- Ran the example and it still works as expected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Tasks Tools for parallel and async work C-Docs An addition or correction to our documentation C-Examples An addition or correction to our examples D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants